package it.esselunga.iphone.client;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.dom.client.Element;

public class JQTouch extends JavaScriptObject {

    public final static native JQTouch instance() /*-{

        if( $wnd.jQT == undefined ) {
            init();
        }

        return $wnd.jQT;
    }-*/;

    protected JQTouch() {
    }

    public static native void init() /*-{
        $wnd.jQT = $wnd.$.jQTouch({
            icon: 'kilo.png',
            statusBar: 'black'
        });
    }-*/;
    
    public final native void goBack() /*-{
        this.goBack();
    }-*/;

    public final native void slideUp(String id) /*-{

        if( document.getElementById(id) ) {
            document.getElementById(id).slideUp();
        }
    }-*/;
}
